<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style type="text/css">
        .footer{
            position:absolute;
            left:0;
            right:0;
            bottom:10px;
            color:#666;
            text-align:center;
        }
    </style>

    <script>
        function save() {
          let tName =$("#tName").val();
          let roomCount =$("#roomCount").val();
          $.post("/type/inserOne",{"tName":tName,"roomCount":roomCount},function (data) {
              if(data){
                  bootoast({
                      message:"添加成功",
                      position:"top",
                      timeout:2,
                      type:"success"
                  })
              }else{
                  bootoast({
                      message:"添加失败",
                      position:"top",
                      timeout:2,
                      type:"danger"
                  })
              }

          })
        }
    </script>
</head>
<body>
<div class="myfrom">
    <from id="myfrom">
        <div class ="from-grop">
            <label for="tName">类型名称：</label>
            <input type="text" class="from-control" name="tName"id="tName"placeholder="请输入类型名称：">
        </div>
        <div class ="from-grop">
            <label for="roomCount">房间数量：</label>
            <input type="number" id="roomCount" class="from-control" name="roomCount"placeholder="请输入房间名称：">
        </div>
        <button type="button" class="btn btn-success" onclick="save()">保存</button>

    </from>
</div>

</body>
</html>